package com.ld.security.auth.shiro.util;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;

public class ShiroUtil {



    public static  <E> E get(Object key){
        Session session =  SecurityUtils.getSubject().getSession();

        return (E)session.getAttribute(key);
    }

    public static void set(Object key,Object val){
        Session session =  SecurityUtils.getSubject().getSession();
        session.setAttribute(key,val);
    }



}
